#include "utilitfile.h"

UtilitFile::UtilitFile(QObject *parent) :
    QObject(parent)
{
}


bool UtilitFile::saveDomToFile(const QDomDocument* doc, const QString& fileName)
{
    QFile file(fileName);
    if(!file.open(QIODevice::WriteOnly))
    {
        return false;
    }

    QTextStream out(&file);
    out.setCodec("UTF-8");
    doc->save(out,4,QDomNode::EncodingFromTextStream);
    file.close();

    return true;
}

